import Cookies from 'cookies-js'

import {
  SESSION_TOKEN,
  SESSION_ACCOUNT,
  REFRESH_TOKEN,
} from 'cache'

// 退出系统，清楚所有user相关Token
export const removeCookie = () => {
  Cookies.expire(SESSION_TOKEN, { path: '/', domain: __COOKIE_DOMAIN__ })
  Cookies.expire(REFRESH_TOKEN, { path: '/', domain: __COOKIE_DOMAIN__ })
  Cookies.expire(SESSION_ACCOUNT, { path: '/', domain: __COOKIE_DOMAIN__ })
}
